Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [Context Switching] Maintain datasource collapse state #17616

Merged
merged 170 commits into from
Dec 5, 2022

Conversation

akash-codemonk
Copy link
Contributor

@akash-codemonk akash-codemonk commented Oct 17, 2022

Description

Maintain datasource collapse state when switching back to the datasource.

Media

collapse.mov

Code changes

Fixes #17439

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Cypress

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • New Features

    • Added functionality to maintain the collapse state of data source sections during user interactions.
    • Introduced new methods for expanding sections and asserting collapse states in the user interface.
    • Added new action creators for managing the collapsible state of data sources.
  • Bug Fixes

    • Enhanced the testing coverage for data source collapsibility, ensuring consistent UI behavior.
  • Documentation

    • Improved clarity in the implementation of selectors related to data source collapsibility.
  • Refactor

    • Transitioned the Collapsible component from a class-based to a functional component for better readability and performance.

@akash-codemonk
Copy link
Contributor Author

/ok-to-test sha=adca177

@hetunandu hetunandu marked this pull request as ready for review December 1, 2022 13:21
@hetunandu hetunandu changed the title chore: Maintain datasource collapse state feat: [Context Switching] Maintain datasource collapse state Dec 1, 2022
@github-actions github-actions bot added the Enhancement New feature or request label Dec 1, 2022
@github-actions
Copy link

github-actions bot commented Dec 1, 2022

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3593061085.
Workflow: Appsmith External Integration Test Workflow.
Commit: adca177.
PR: 17616.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17616&runId=3593061085_1

@akash-codemonk
Copy link
Contributor Author

/ok-to-test sha=5c932eb

@github-actions
Copy link

github-actions bot commented Dec 2, 2022

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3599515334.
Workflow: Appsmith External Integration Test Workflow.
Commit: 5c932eb.
PR: 17616.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17616&runId=3599515334_1

@akash-codemonk akash-codemonk merged commit 3eab587 into release Dec 5, 2022
@akash-codemonk akash-codemonk deleted the chore/datasource-accordion-state branch December 5, 2022 05:58
tanvibhakta added a commit that referenced this pull request Dec 6, 2022
* replace BlackAuthCardNavLink with Link from design system

* Replace AuthCardNavLink with Link from design system

* Refactor ForgotPasswordLink to use Link from design-system

* use variables from ads

* replace FooterLinks with Link

* bump design-system alpha version

* fix issue with Segment header props

* Add font size for ForgotPassword explicitly

* bump alpha version

* Make "Sign In" text primary as well

* Update ds alpha version

* use TextType in location

* use typography constants from design-system

* update alpha version

* bump design-system version

* Empty-Commit

* use correct typographic variables

* fix: Form message component link issue

* removed the inverted flag for testing

* Update to use correct variable

* Change floatingBtn in DefaultTheme file

* fix: Made changes to pass action link element to design system component - formMessage

* chore: update design-system version to fix issue with radio

* Remove unnecessary imports

* fix Merge_spec.js cypress test

* fixed conflict with react router Link and design system Link

* chore: dependentbot vulnerabilities. (#18528)

* fix: dependentbot vulnerabilities.

* chore: remove emoji-mart.

* chore: updated react-syntax-highlighter

* chore: update ts-loader add loader-utils resolution.

Co-authored-by: Aishwarya UR <[email protected]>

* fix:  Added support for country code flags on windows devices (#18203)

* fix: add pollyfill and use font family.

* fix: use latest version design system.

Co-authored-by: Aishwarya UR <[email protected]>

* fix: Updating spec for member roles (#18657)

updated spec for member roles

* feat: [Context Switching] Maintain datasource collapse state (#17616)

* chore: Remove debugging logs for analytics (#18662)

* chore: Support using custom port(s) for listening in the start-https.sh script (#18451)

Added `--https-port` and `--http-port`, so you can set a custom port instead of the default 80 and 443. This is useful if you want to test Appsmith when using a non-standard port, fox example, how `appsmith.URL.host` behaves, or how OAuth redirects behave etc.

We also add a shortcut to start this with release endpoint. Just using `release` is now the same thing as using `https://release.app.appsmith.com`. This is useful to people like me who are _very_ good with typos.

* feat: Adding Embedding Apps Functionality in the API (#18566)

* chore: fix ingress fieldname in appsmith (#18684)

* fix: Auto height breaks for fixed modal's children (#18691)

Fix issue where auto height was throwing an error when a fixed modal widget's children were changing height automatically

* fix: datasource autosave git issue fixed (#18690)

* datasource autosave git issue fixed

* Added appropriate comments

Co-authored-by: “sneha122” <“[email protected]”>

* chore: Improved metadata on logs when reading DSL fails (#18692)

* chore: Improved metadata on logs when reading DSL fails

* Fixed test

* Test fix

* Review comment

* Update top contributors

* chore: bump ds version to use better MenuDivider type

Co-authored-by: Albin <[email protected]>
Co-authored-by: Parthvi Goswami <[email protected]>
Co-authored-by: Arsalan Yaldram <[email protected]>
Co-authored-by: Aishwarya UR <[email protected]>
Co-authored-by: Ankita Kinger <[email protected]>
Co-authored-by: akash-codemonk <[email protected]>
Co-authored-by: Anagh Hegde <[email protected]>
Co-authored-by: Shrikant Sharat Kandula <[email protected]>
Co-authored-by: Nilansh Bansal <[email protected]>
Co-authored-by: Goutham Pratapa <[email protected]>
Co-authored-by: Abhinav Jha <[email protected]>
Co-authored-by: sneha122 <[email protected]>
Co-authored-by: “sneha122” <“[email protected]”>
Co-authored-by: Nidhi <[email protected]>
Co-authored-by: Appsmith Bot <[email protected]>
@Nikhil-Nandagopal Nikhil-Nandagopal added the IDE Product Issues related to the IDE Product label Aug 5, 2024
Copy link
Contributor

coderabbitai bot commented Aug 5, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The recent changes enhance the application's ability to maintain the collapse state of data source sections during context switching. New test cases were introduced to verify this functionality, alongside improvements in the UI component structure, Redux actions, and state management. This ensures a seamless user experience, allowing users to switch between data sources without losing their interface state.

Changes

Files Change Summary
app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/IDE/MaintainContext&Focus_spec.js Added a test case to verify that the collapse state of data source sections is maintained across context switches.
app/client/cypress/support/Objects/CommonLocators.ts Introduced a new property _chevronUp referencing an icon for collapsible sections.
app/client/cypress/support/Pages/DataSources.ts Added methods for expanding sections and asserting their collapse state.
app/client/src/actions/datasourceActions.ts Introduced action creators for managing the collapsible state of data sources.
app/client/src/ce/constants/ReduxActionConstants.tsx Added new constants for handling collapsible state actions.
app/client/src/navigation/FocusElements.ts Updated FocusElement enum and configuration for managing collapsible states.
app/client/src/pages/Editor/DataSourceEditor/Collapsible.tsx Refactored Collapsible from a class-based to a functional component format.
app/client/src/reducers/uiReducers/datasourcePaneReducer.ts Modified the reducer to handle new actions related to collapsible state management.
app/client/src/selectors/ui.tsx Added new selectors for retrieving collapsible state from the Redux store.

Assessment against linked issues

Objective Addressed Explanation
Persist accordion open/close state during context switching (Issue #17439)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request IDE Navigation Issues/feature requests related to IDE navigation, and context switching IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Task A simple Todo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Context switching - Accordions
3 participants